#!/bin/csh -f

set inp = "undefined"
if ($#argv == 1) then
  set inp = $1
endif

if ("$inp" != "-nomodules") then

source /opt/modules/default/init/csh

module unload PrgEnv-cray
module unload PrgEnv-gnu
module unload PrgEnv-intel
module unload PrgEnv-pgi
module load PrgEnv-intel/5.2.40

module unload intel
module load intel/17.0.2.174

module unload cray-mpich
module unload cray-mpich2
module load cray-mpich/7.3.2

module unload netcdf
module unload cray-netcdf
module unload cray-hdf5
module unload cray-hdf5-parallel
module unload cray-netcdf-hdf5parallel
module unload cray-parallel-netcdf
module load cray-netcdf/4.3.2
module load cray-hdf5/1.8.13

module unload cray-libsci

module load craype-haswell

setenv NETCDF_PATH ${NETCDF_DIR}
limit coredumpsize unlimited
limit stacksize unlimited

endif

setenv ICE_MACHINE_MACHNAME conrad
setenv ICE_MACHINE_MACHINFO "Cray XC40 Xeon E5-2698v3 Haswell"
setenv ICE_MACHINE_ENVNAME intel
setenv ICE_MACHINE_ENVINFO "ifort 17.0.2 20170213"
setenv ICE_MACHINE_MAKE gmake
setenv ICE_MACHINE_WKDIR $WORKDIR/ICEPACK_RUNS
setenv ICE_MACHINE_INPUTDATA /p/work1/RASM_data/cice_consortium
setenv ICE_MACHINE_BASELINE $WORKDIR/ICEPACK_BASELINE
setenv ICE_MACHINE_SUBMIT "qsub "
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_QUEUE "debug"
setenv ICE_MACHINE_TPNODE 32        # tasks per node
setenv ICE_MACHINE_BLDTHRDS 4
setenv ICE_MACHINE_QSTAT "qstat "
